<admintpl file="header"/>

<link rel="stylesheet" href="__PUBLIC__/css/main.css">
<link rel="stylesheet" href="__PUBLIC__/css/act_info.css">
<script src="__PUBLIC__/js/uploadify/jquery2.js" type="text/javascript"></script>
<script src="__PUBLIC__/js/uploadify/jquery.uploadify.min.js" type="text/javascript"></script>
<script src="__PUBLIC__/js/jquery.form.js" type="text/javascript"></script>
<link rel="stylesheet" type="text/css" href="__PUBLIC__/js/uploadify/uploadify.css">

<link rel="stylesheet" href="__PUBLIC__/css/jquery.datetimepicker.css">
<script src="__PUBLIC__/js/laydate.js"></script>

<style type="text/css">
    .hidden {
        display: none;
    }
</style>
</head>
<body>

<div class="manage">
    <span><a href="{:U('Package/index')}">运营管理</a></span>
</div>

<div class="act_main"><a href="{:U('Package/index')}">运营工具</a>
        <span class="act-nav">
                <a href="{:U('Package/index')}">渠道包管理</a>

        </span>
</div>

<div class="wrap">
    <div class="act_title">
        <div class="act_left">
            <span class="act_all"><a href="#" class="rehref" style="color: #000">添加<if condition="$Type eq 2">默认</if>渠道包</a></span>

        </div>
    </div>
    <div class="form-horizontal Jactadd">
        <div class="control-group">
            <label class="control-label act-info"></label>

            <div class="controls act_right text-center">
                <ul>
                    <li><a href="{:U('Package/index')}">> <span>返回渠道包管理</span></a></li>
                </ul>
            </div>
        </div>

        <div method="post" id="formSubmit" class="form-horizontal " action="{:U('Package/addHandel')}" enctype="multipart/form-data">
            <if condition="$Type neq 2">
                <div class="control-group">
                    <label class="control-label ">渠道包名称：</label>

                    <div class="controls">
                        <input type="text" name="Name" placeholder="请添加名称" maxlength="20">
                        <span class="form-required">*</span>
                    </div>
                </div>
            </if>
            <input type="hidden" name="Type" class="typeInfo" value="{$Type}">

            <div class="control-group">
                <label class="control-label">渠道包：</label>

                <div class="controls">
                    <div id="packageInfo">
                        <form id="packageForm" action="{:U('Package/uploadify')}" method="post"
                              enctype="multipart/form-data">
                            <input type="file" id="file_upload" name="coverImg" accept="application/apk"
                                   onChange="upfilePackage(this);">

                        </form>
                        <span class="uploadStatus" style="color: red"></span>
                        <input type="hidden" name="packageName" id="image" class="image">
                        <span class="form-required requied-res">*</span>
                    </div>
                </div>


            </div>

            <if condition="$Type neq 2">
                <div class="control-group">
                    <label class="control-label ">有效期：</label>

                    <div class="controls">
                        <input type="text" name="ExpirationTime" id="onlinetime" placeholder="请选择有效时间">
                        <span class="form-required">*</span>

                        <input type="checkbox" name="Forever" value="1">永久
                    </div>


                </div>

                <div class="control-group">
                    <label class="control-label ">微信url：</label>

                    <div class="controls">
                        <input type="text" name="WeiXinUrl" placeholder="微信url">
                        <span class="form-required">*</span>
                    </div>
                </div>


            </if>

            <div class="control-group">
                <label class="control-label "></label>

                <div class="controls">
                    <button type="button" class="btn btn-primary ckeckSubmit">提交</button>
                    <span class="form-required"></span>
                </div>
            </div>
        </div>
    </div>
</div>


<script type="text/javascript">

    var addPackageUrl = "{:U('Package/addHandel')}";
    var viewPackageUrl = "{:U('Package/view')}";

    $(function () {

        $('#onlinetime').click(function(){
            laydate({elem: '#onlinetime',format: 'YYYY-MM-DD hh:mm:ss',istime: true});
        });

        $('.rehref').click(function () {
            location.reload();
        })
    })

</script>
<script src="__PUBLIC__/js/common.js"></script>
<script src="__PUBLIC__/js/artDialog/artDialog.js"></script>
<script src="__PUBLIC__/js/package.js"></script>
</body>
</html>